package cn.loan.service;

import cn.loan.entity.ByStages;

/**
 * @Author: 毛苏宇
 * @Description: You can do it!
 * @Date: Create in 11:48 2019/3/22
 */
public interface ByStagesService {

    /**
     * 添加借款
     * @param byStages 借款信息
     * @return true=成功,false=失败
     */
    boolean addByStages(ByStages byStages) throws Exception;


    /**
     * 应还金额
     * @param userId 用户id
     * @return 金额
     */
    double getAmountPayable(int userId) throws Exception;


    /**
     * 是否有暂无下款的记录
     * @param userId
     * @return
     */
    boolean getLoanExist(int userId) throws Exception;

    /**
     * 查询用户的借款记录
     * @param userId
     * @return
     * @throws Exception
     */
    ByStages getLoanRecord(int userId) throws Exception;

}
